package warehouse;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *
 * @author Razvan
 */
public class TableNode {

    String tableName;
    Map<String, Integer> columnNamesQueryMap;
    List<TableNode> children;

    public TableNode(String tableName) {
        this.tableName = tableName;
        columnNamesQueryMap = new HashMap<String, Integer>();
        children = new ArrayList<TableNode>();
    }

    public void addAllColumns(Collection<String> columns) {
        for (String col : columns) {
            addColumn(col);
        }
    }

    public void addColumn(String column) {
        addColumn(column, 0);
    }

    public void addColumn(String column, int count) {
        columnNamesQueryMap.put(column, count);
    }
}
